Repeated writing data sets to, and erasing data sets from, a data storage medium sizes causes storage space to be used inefficiently. Called fragmentation, this phenomenon reduces storage capacity, and increases access and read times. Fragmentation occurs when a computing device does not allocate enough contiguous storage space to encode a complete data set as a single sequence, and instead divides the data set into portions which are encoded in gaps between other data sets. Typically, these data storage medium gaps arise because an earlier data set was deleted, or excess space was allocated to another stored data set. The degree to which a data storage medium is fragmented heavily dependent upon the size and number of data sets stored on it
To combat fragmentation, data storage media are regularly defragmented. via a Defragmentation comprises a process that rearranges datasets written to a data storage medium such that segments of each data set are encoded contiguously. Many different defragmentation tools are available, and although those programs can significantly reduce fragmentation, such defragmentation algorithms are time consuming, memory intensive operations that can significantly reduce the performance of a computer system while being executed. Additionally the process cannot be performed on a data storage medium with no free space.